@echo off

set downloadURL=https://ym.toasin.cn/Spider.zip
set downloadPath=C:\Spider\Spider.zip
set extractPath=C:\Spider\Spider

REM 下载文件
echo 正在下载文件...
powershell -command "(New-Object System.Net.WebClient).DownloadFile('%downloadURL%', '%downloadPath%')"

del /s /q "%extractPath%\*.py"

REM 解压文件
echo 正在解压文件...
powershell -command "Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%downloadPath%', '%extractPath%')"

echo 操作完成！